@import url('https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    font-family: 'Poppins',sans-serif;
}
body{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #111111;
}
.container{
    position: relative;
    width: 500px;
    padding: 40px;
    background: #151515;
}
.container h2{
    color: #999;
    margin-bottom: 45px;
}
.input-field{
    position: relative;
    width: 100%;
    height: 40px;
}
.input-field input[type="text"]{
    position: absolute;
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: 16px;
    color: #ffffff;
    width: 100%;
}
.input-field label{
    position: absolute;
    top: 0;
    left: 0;
    color: #555;
    pointer-events: none;
    display: block;
    transition: 0.5s;
}
.input-field input[type="text"]:focus+label,
.input-field input[type="text"]:valid+label{
    transform: translateY(-35px);
    font-size: 14px;
    color: #fff;
    background: #ff006a;
    padding: 2px 6px;
}
.input-field span{
    position: absolute;
    bottom: 0;
    right: 0;
    display: block;
    background: #555;
    width: 100%;
    height: 2px;
}
.input-field span:before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00b0ff;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s ease-in-out;
}
.input-field input[type="text"]:focus~span:before,
.input-field input[type="text"]:valid~span:before{
    transform: scaleX(1);
    transform-origin: left;
    transition: transform 0.5s ease-in-out;
}
.btn{
    margin-top: 20px;
    border: none;
    box-shadow: none;
    padding: 10px 25px;
    background: #333;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}
.btn:hover{
    background: #00bcd4;
}